Create Edit
AutomatR.ChatGPT.Activities.CreateEdit
The "Create Edit" activity in AutomatR is part of the ChatGPT activities package, providing the capability to generate edited text based on the provided instruction using the OpenAI GPT model. This activity sends a POST request to the OpenAI API, retrieves the generated edited text, and outputs the result as a CreateEditModel
data type.
Properties
Name | Description |
---|---|
Input | |
Instruction | Instruction for generating the desired response. String variables containing the instruction for text generation. |
Model | The ID of the model to use for text generation (example: text-davinci-edit-001). String variables containing the model ID. |
Prompt | The input prompt for text generation. String variables containing the input prompt. |
Misc | |
Display Name | This property allows you to customize the display name of the activity within the workflow. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Create Edit" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
n | How many completions to generate for each prompt. Integer variables containing the number of completions. |
Temperature | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Double variables containing the temperature value. |
Output | |
Response | Outputs the result of the "Create Edit" operation as a CreateEditModel data type. Variables of type CreateEditModel to store the generated edited text. |
How to use:
- Drag and drop the "Create Edit" activity onto the workflow.
- Configure the properties by specifying the model, prompt, instruction, temperature, and the number of completions.
- Optionally, configure the delay before executing the activity.
- Execute the workflow to generate edited text based on the provided instruction.
Example: Consider an example where the "Create Edit" activity is used to generate edited text based on a user prompt and instruction:
Create Edit:
Model: "text-davinci-edit-001"
Prompt: "Write a paragraph about nature."
Instruction: "Make the paragraph more engaging and lively."
Temperature: 0.8
n: 1
Response: editedTextResult
In this example, the activity generates edited text based on the user's prompt "Write a paragraph about nature" with the instruction "Make the paragraph more engaging and lively" using the text-davinci-edit-001 model. The resulting edited text is stored in the variable "editedTextResult" for further use in the workflow.